<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>

<div class="panel-lite">
  <div class="thumbur">
	<div class="icon-lock"></div>
  </div>
  <h4>用户登录</h4>
  <div class="form-group">
	<input required="required" class="form-control" id="teacher"/>
	<label class="form-label">用户名    </label>
  </div>
  <div class="form-group">
	<input type="password" required="required" class="form-control" id="pwd"/>
	<label class="form-label" >密　码</label>
  </div><a href="#">忘记密码 ?  </a>
  <button class="floating-btn" id="loginClick"><i class="icon-arrow"></i></button>
</div>

<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器：360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。</p>

</div>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function loginShow() {
            var teacher=$("#teacher").val();
            var pwd =$("#pwd").val();
            if(teacher==null || teacher==""){
                alert("请输入账号！");
            }else if(pwd==null || pwd==""){
                alert("请输入密码！")
            }else{
                window.location.href="/index.teacher?teacher="+teacher+"&pwd="+pwd;
            }
        }
        $("#loginClick").click(function () {
            loginShow();
        })
        $(document).keydown(function(a){
            if(a.keyCode=="13"){//回车
                loginShow();
            }
        })
    </script>

</html>